﻿/*
 *	Copyright (c) 2009 Queensland University of Technology. All rights reserved.
 *	The QUT Bioinformatics Collection is open source software released under the 
 *	Microsoft Public License (Ms-PL): http://www.microsoft.com/opensource/licenses.mspx.
 */
using System.Text;
using System;
using System.Collections.Generic;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using QUT.Bio.TagService;

namespace QUT.Bio.Tags {
	public class CategorisedRdfTagTemplate: WrappedRdfTag {
		public bool IsMine {
			get;
			set;
		}

		public bool IsFriend {
			get;
			set;
		}

		public bool IsAnonymous {
			get;
			set;
		}

		public Dictionary<string, bool> isOntology = new Dictionary<string, bool>();

		public Dictionary<string, bool> IsOntology {
			get {
				return isOntology;
			}
		}

		public CategorisedRdfTagTemplate( RdfTag tag ) 
		: base( tag )
		{
			foreach ( var record in Tags.OntologyNamespacePredicates ) {
				isOntology[record.Key] = false;
			}

			try {
				isOntology[Tags.NamespaceOf( tag.TagObjectUri )] = true;
			}
			catch {
				// Several things could go wrong here, e.g. a null or empty uri. I don't care.
			}
		}
	}
}
